USE [RestaurantManagement]
GO

IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Restaurants_RestaurantID]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Restaurant] DROP CONSTRAINT [DF_Restaurants_RestaurantID]
END

GO

USE [RestaurantManagement]
GO

/****** Object:  Table [dbo].[Restaurant]    Script Date: 04/25/2013 11:40:41 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Restaurant]') AND type in (N'U'))
DROP TABLE [dbo].[Restaurant]
GO

USE [RestaurantManagement]
GO

/****** Object:  Table [dbo].[Restaurant]    Script Date: 04/25/2013 11:40:41 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[Restaurant](
	[RestaurantID] [uniqueidentifier] NOT NULL,
	[RestaurantCode] [varchar](20) NULL,
	[RestaurantName] [nvarchar](255) NULL,
	[Address] [nvarchar](255) NULL,
	[PhoneNumber] [varchar](20) NULL,
	[Fax] [varchar](20) NULL,
	[Email] [varchar](100) NULL,
	[Website] [varchar](100) NULL,
	[TaxCode] [varchar](20) NULL,
	[IsAgencies] [bit] NULL,
	[IsActive] [bit] NULL,
	[Description] [nvarchar](255) NULL,
 CONSTRAINT [PK_Restaurants] PRIMARY KEY CLUSTERED 
(
	[RestaurantID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[Restaurant] ADD  CONSTRAINT [DF_Restaurants_RestaurantID]  DEFAULT (newid()) FOR [RestaurantID]
GO


